<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/system/common.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/system/useronline.js"></script>

<div id="userCount_grid" style="padding: 10px">

</div>

<script>
    $(document).ready(function () {
        $("#userCount_grid").datagrid({
            url: getRootPath() + '/userCount/getCount',
            method: 'get',
            fitColumns: true,
            columns: [[
                {
                    title: "用户级别",
                    field: "userlevel",
                    width: 40,
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == '0') {
                            return "体验用户";
                        }
                        if (value == '1') {
                            return "租用用户";
                        }
                        if (value == '2') {
                            return "经典用户";
                        }
                        if (value == '3') {
                            return "尊享用户";
                        }
                        if (value == '4') {
                            return "标准用户";
                        }
                    }
                },
                {
                    title: "用户数量", field: "userNum", width: 30, sortable: true, formatter: function (value, row, index) {
                        return value;
                    }
                },
                {
                    title: "在线数量", field: "onlineNum", width: 30, sortable: true, formatter: function (value, row, index) {
                        return value;
                    }
                },
            ]],
        });
    });
</script>

